<div class="col-md-4 table-condensed">
    <table class="table table-hover table-striped table-bordered">
        <tr>
            <td>编号</td>
            <td>{$data['id']}</td>
        </tr>
        <tr>
            <td>姓名</td>
            <td>{$data['name']}</td>
        </tr>
        <tr>
            <td>联系电话</td>
            <td>{$data['phone']}</td>
        </tr>
        <tr>
            <td>身份证号码</td>
            <td>{$data['id_card']}</td>
        </tr>
        <tr>
            <td>推荐人</td>
            <td>{$data['referrer']}</td>
        </tr>
        <tr>
            <td>地址</td>
            <td>{$data['address']}</td>
        </tr>
        <tr>
            <td>套餐名称</td>
            <td>{$data['good_name']}</td>
        </tr>
        <tr>
            <td>套餐价格</td>
            <td>{$data['good_price']}</td>
        </tr>
        <tr>
            <td>预约日期</td>
            <td>{$data['order_date']|date="Y-m-d",###}</td>
        </tr>
        <tr>
            <td>状态</td>
            <td>{$data['status']?'已处理':'未处理'}</td>
        </tr>
        <tr>
            <td>处理人</td>
            <td>
                <input name="order_person" type="text" class="form-control">
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="button" class="btn btn-success" style="width: 100px" name="order_submit" value="提交">
            </td>
        </tr>
    </table>
</div>
<script>
 $(document).ready(function () {
     $("input[name='order_submit']").click(function () {
         console.log('submit');
         var obj = $(this).parent().parent().parent();
         var id = $.cookie('order_id');
         var person = $("input[name='order_person']").val();
         $.ajax({
             url: '/admin.php/Order/doneOrder',
             method: 'post',
             data :{
                 'order_id': id,
                 'person': person
             },
             dataType:'json',
             success: function (res) {
                 if (res.code == 200) {
                     alert("处理成功 !");
                     window.location.href="/admin.php/order/undoPage";
                 } else {
                     alert("处理失败 !");
                 }
             }
         });
     });
 });
</script>